﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<UserRegister>" %>
<%@ Import Namespace="ECube.SEC.FormsAuthentication.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%  object  result = null;
    this.ViewData.TryGetValue("ModelResult", out result);
    if (result != null && (bool)result)
    {%>
    注册成功！<%=Html.Link(Html.Localize("Login"),ViewData.GetSignInUrl())%>   
    <%}
    else
    {
        Html.EnableClientValidation();
        using (Html.BeginForm("Register", "User", FormMethod.Post, new { id = "frmRegister", name = "frmRegister", @class = "login" }))
        {
       
       %>    
        <h2 class="title"><%=Html.Localize("User.RegisterTitle", "Register User")%></h2>        
        <%=Html.ValidationSummary()%>
        <div class="username">
            <%= Html.LabelFor(m => m.UserName, true)%>
            <%= Html.TextBoxFor(m => m.UserName, new { @class = "text" })%>
            <%= Html.ValidationMessageFor(m => m.UserName,true)%>
        </div>
        <div class="username">
            <%= Html.LabelFor(m => m.DisplayName, true)%>
            <%= Html.TextBoxFor(m => m.DisplayName, new { @class = "text" })%>
            <%= Html.ValidationMessageFor(m => m.DisplayName,true)%>
        </div>
        <div class="email">
            <%= Html.LabelFor(m => m.Email, true)%>
            <%= Html.TextBoxFor(m => m.Email, new { @class = "text" })%>
            <%= Html.ValidationMessageFor(m => m.Email)%>
        </div>
        <div class="password">
            <%= Html.LabelFor(m => m.Password, true)%>
            <%= Html.PasswordFor(m => m.Password, new { @class = "text" })%>
            <%= Html.ValidationMessageFor(m => m.Password,true)%>
        </div>
        <div class="password">
             <%= Html.LabelFor(m => m.ConfirmPassword, true)%>
             <%= Html.PasswordFor(m => m.ConfirmPassword, new { @class = "text" })%>
             <%= Html.ValidationMessageFor(m => m.ConfirmPassword,true)%>
            
        </div>
        <div class="submit">
            <input type="submit" value="<%=Html.Localize("User.RegisterButton", "Register") %>" id="login_submit" class="submit button" />
        </div><%
        }
    }%>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
<%=Html.PageTitle(Html.Localize("User.RegisterTitle", "Register"))%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MetaDescription" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="HeadCustom" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="HeadCssFiles" runat="server">
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="HeadScripts" runat="server">
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/validate/jquery.validate.min.js")%>" ></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/MicrosoftMvcJQueryValidation.js")%>" ></script>
    <%Html.RenderScriptTag("base.js"); %>
</asp:Content>

<asp:Content ID="Content7" ContentPlaceHolderID="ScriptVariablesPre" runat="server">
</asp:Content>

<asp:Content ID="Content8" ContentPlaceHolderID="Scripts" runat="server">    
</asp:Content>

<asp:Content ID="Content9" ContentPlaceHolderID="ScriptVariablesPost" runat="server">
</asp:Content>
